import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router';
import "vant/lib/index.css";
import "@/assets/css/index.css";
import "animate.css";


import { createPinia } from "pinia";
//pinia的持久化插件
import PiniaPluginPersistedState from "pinia-plugin-persistedstate";
const pinia = createPinia();
//加载持久化插件
pinia.use(PiniaPluginPersistedState);
const app = createApp(App)

//注册全局组件
import PageView from "@/components/PageView";
app.component("page-view", PageView);

//导入vant的懒加载插件
import { Lazyload } from "vant"
app.use(router)
    .use(pinia)
    .use(Lazyload, {
        lazyComponent: true         //组件也可以懒加载
    })
    .mount('#app')


